import cv2
import numpy as np

img = cv2.imread('./111111.png')

logo = np.zeros((50,50,3),np.uint8)
mask = np.zeros((50,50),np.uint8)
logo[12:25,12:25] = [0,0,255]
logo[25:37,25:37] = [0,255,255]

mask[12:25,12:25] = 255
mask[25:37,25:37] = 255
m = cv2.bitwise_not(mask)

roi = img[0:50,0:50]

tmp = cv2.bitwise_and(roi,roi,mask=m)
dst = cv2.add(tmp,logo)
img[0:50,0:50] = dst

# cv2.imshow('logo',logo)
# cv2.imshow('img',img)
cv2.imshow('mask',m )
# cv2.imshow('dst',dst)
cv2.imshow('tmp',tmp)
cv2.waitKey(0)
